﻿<!-- #include file="mymin.asp" -->
<card title="移动帖子"><p>
<%

dim p,id,a,title,content,rs
' p=getN("p",1)
' if p<1 then p=1

id=getN("id",0)
a=getN("a",0)

if a=0 then
	set rs=Server.CreateObject("ADODB.Recordset")
	rs.open"select classid,name from 74hu_bbs",myconn,1,1
	If Not rs.eof Then
		dim pagesize,count,page,i,pagecount
		PageSize=10
		Count=rs.recordcount
		page=getN("page",1)
		if page<1 then page=1
		pagecount=(count+pagesize-1)\pagesize
		if page>pagecount then page=pagecount
		rs.move(pagesize*(page-1))
		w "请选择要移动的分类:<br/>"
		For i=1 To PageSize
		If rs.eof Then Exit For
			w "<a href=""movepost.asp?sid="&sid&"&amp;id="&id&"&amp;a="&rs("classid")&""">"&rs("name")&"</a><br/>"
			rs.moveNext
		Next
		w showPage("movepost.asp", "id:"&id&",p:"&p, page, pageCount)&""
	Else
		w "暂时没有论坛！"
	End If
	rs.close
	set rs=nothing
else
	set rs=Server.CreateObject("ADODB.Recordset")
	rs.open"select classid from 74hu_bbs where classid="&a,myconn,1,1
	If Not rs.eof Then
		myconn.execute("update 74hu_topic set classid="&a&" where id="&id)
		w "帖子移动成功!<a href='post.asp?sid="&sid&"&amp;id="&id&"'>查看帖子</a>"
	Else
		w "论坛已被删除！"
	end if
	rs.close
	set rs=nothing
end if
w "<br/>----------<br/><a href=""posts.asp?sid="&sid&""">[全部帖子]</a>"

call bbsLast
%>